package com.wander.designCreational.factorymethod.client;

import com.wander.designCreational.factorymethod.factory.AppleFactoryImpl;
import com.wander.designCreational.factorymethod.factory.Factory;
import com.wander.designCreational.factorymethod.factory.RedmiFactoryImpl;
import com.wander.designCreational.factorymethod.product.Phone;
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
import java.util.Collection;

/**
 * @Author : WDYin
 * @Date : 2020/5/8
 * @Description :
 */
public class Client {

    @Test
    public void test1() {

        Factory applePhoneFactory = new AppleFactoryImpl();
        Factory redmiPhoneFactory = new RedmiFactoryImpl();

        Phone applePhone = applePhoneFactory.getPhone();
        Phone redmiPhone = redmiPhoneFactory.getPhone();

        System.out.println(applePhone);
        System.out.println(redmiPhone);

        applePhone.produce();
        redmiPhone.produce();
    }
}
